<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:c="http://java.sun.com/jsf/core">
<head>
    <meta charset="UTF-8">
    <title>shopHome</title>
    <style>
        html {
            background: url(https://i02piccdn.sogoucdn.com/122644300e8e567f) no-repeat center center fixed;
            -webkit-background-size: cover;
            -moz-background-size: cover;
            -o-background-size: cover;
            background-size: cover;
        }
    </style>
</head>
<body>
<div>
    <div th:object="${session.USER}">
        [ <span th:text="*{permission}"></span>:
        <span th:text="*{uname}"></span><br>
        账户:<span th:text="*{account}"></span>
        ]
        <p th:text="${noM}"></p>
        <a th:href="@{/page/recharge/(${session.USER.getUname()})}">充值</a>
        <a th:href="@{/page/login}">退出</a>
        <a th:href="@{/user/Login/(uname=${session.USER.getUname()},pwd=${session.USER.getPwd()})}">刷新</a>


    </div>
    <div >
        <!--        搜索框-->
        <form action="/Menu/search">
            <input name="shop_name" id="shop_name"  placeholder="使用商店名搜索">
            <input name="name" id="name"  placeholder="使用商品名搜索">
            <input name="price" id="price" placeholder="使用价格搜索">
            <select name="type" id="type" >
                <option>早餐</option>
                <option>中餐</option>
                <option>午餐</option>
                <option>甜食</option>
                <option>米</option>
                <option>面</option>
            </select>
            <button type="submit">搜素</button>
            <button type="reset">清除</button>
        </form>
    </div>
    <div>
        <h3>菜单</h3>
        <table border="1">
            <thead>
            <tr>
                <th>商店名</th>
                <th>商品名</th>
                <th>价格</th>
                <th>类型</th>
            </tr>
            </thead>
            <tbody>
            <tr th:each="menus:${menus}">
                <td th:text="${menus.getShop_name()}"></td>
                <td th:text="${menus.getName()}"></td>
                <td th:text="${menus.getPrice()}"></td>
                <td th:text="${menus.getType()}"></td>
                <c:forEach var="1" items="${requestScope.1}">
                    <td><a th:href="@{/bill/addBill/(shop_name=${menus.getShop_name()},shopid=${menus.getId()},price=${menus.getPrice()},shopName=${menus.getName()},type=${menus.getType()},user_name=${session.USER.getUname()})}">加入订单</a></td>
                </c:forEach>
            </tr>

            </tbody>
        </table>
    </div>
</div>
</body>
</html>